
import { handleActions } from "redux-actions";

import { GET_CHILD_TYPE } from "../types";

import _ from "lodash";
//创建初始化子类型列表值
const initChildData = {
    curPage: 1,
    eachPage: 15,
    total: 0,
    maxPage: 0,
    rows: [],
    TatolData:[]
}
//创建reducer
export const childType = handleActions({
    [GET_CHILD_TYPE]:(state,{payload})=>{
        const {data}=payload
      return  _.assign({},state,data)
    },
},initChildData)